---
title: bud.minimize
description: Enables or disable minimization optimizations.
tags:
  - configuration
  - optimization
---

Configure code optimization options.

## Usage

Enable optimization:

```js
bud.minimize()
```

Disable optimization:

```js
bud.minimize(false)
```

Use a string or array of strings to enable or disable particular handlers. Possible values: `css`, `js`.

```js
bud.minimize(`css`)
```

```js
bud.minimize([`css`, `js`])
```

Use as a bud.js callback. This is the same as enabling minimization with the default configuration.

```ts title=bud.config.ts
bud.when(bud.isProduction, bud.minimize)
```

```ts title=bud.config.ts
bud.tap(bud.minimize)
```
